import { useNavigate } from "react-router-dom";

function My() {
    const navigate = useNavigate();
    const goAbout = () => {
        const params = {
          id: '3',
          uid: '4'
        };
        navigate(`/about?${new URLSearchParams(params)}`);
      };
    return ( 
        <div>
            <h1>My</h1>
            <button onClick={goAbout}>Go About</button>
        </div>
     );
}

export default My;